#include<iostream>
#include<fstream>
using namespace std;

int main(){
    // 读取story.txt
    ifstream in("story.txt");
    if (!in.is_open()) {
        cout << "Error opening file" << endl;
        return 1;
    }
    // 逐字读写 并统计共有多少字符
    char ch;
    int count = 0;
    while (in.get(ch)) {
        cout << ch;
        count++;
    }
    cout << endl;
    cout << "Total characters: " << count << endl;
    in.close();   
}